package com.guan.ojcommonsecurity.exception;

import com.guan.common.core.enums.ResultCode;
import lombok.Getter;

@Getter
public class ServiceException extends RuntimeException{

    private ResultCode resultCode;

    public ServiceException(ResultCode resultCode) {
        super(resultCode.getMsg()); // 传递描述信息给父类
        this.resultCode = resultCode;
    }

    public ResultCode getResultCode() {
        return resultCode;
    }
}
